package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the PRODUCT_CLASSIFY database table.
 * 
 */
@Entity
@Table(name="PRODUCT_CLASSIFY")
@NamedQuery(name="ProductClassify.findAll", query="SELECT p FROM ProductClassify p")
public class ProductClassify implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PRODUCT_CLASSIFY_CLASSIFYID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PRODUCT_CLASSIFY_CLASSIFYID_GENERATOR")
	@Column(name="CLASSIFY_ID")
	private Long classifyId;

	private String name;

	private Long superid;

	//bi-directional many-to-one association to Product
//	@ManyToOne
//	@JoinColumn(name="ID")
	@OneToMany(mappedBy="productClassify")
	@JSONField(serialize=false)
	private List<Product> products;

	public ProductClassify() {
	}

	public Long getClassifyId() {
		return this.classifyId;
	}

	public void setClassifyId(Long classifyId) {
		this.classifyId = classifyId;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getSuperid() {
		return this.superid;
	}

	public void setSuperid(Long superid) {
		this.superid = superid;
	}

	public List<Product> getProducts() {
		return this.products;
	}

	public void setProduct(List<Product> products) {
		this.products = products;
	}

}